<template>
  <el-card class="box-card">
    <div slot="header" class="clearfix">
      <span>辅助线</span>
    </div>
    <div class="bds">
      <el-collapse v-model="activeName">
        <el-collapse-item title="组件样式" name="c1">
          <el-form size="medium" label-width="100px">

            <el-form-item label="内容布局">
              <el-radio-group size="small" v-model="data.type">
                <el-radio label="solid">实线</el-radio>
                <el-radio label="double">双实线</el-radio>
                <el-radio label="dashed">虚线1</el-radio>
                <el-radio label="dotted">虚线2</el-radio>
              </el-radio-group>
            </el-form-item>

            <el-form-item label="线条颜色">
              <ColorPicker :color="data" :name="'color'"></ColorPicker>
         <!--     <div class="color_div">
                <el-color-picker size="medium" v-model="data.color"></el-color-picker>
                <div class="input-with-reset">
                  <el-input class="" v-model="data.color">
                    <template slot="prepend">#</template>
                    <el-button @click="Reset_Color('text','#FFFFFF')" slot="append">重置</el-button>
                  </el-input>
                </div>
              </div> -->
            </el-form-item>

            <el-form-item label="线条高度">
              <div class="slider_box">
                <el-slider class="slider_item" :max="50" v-model="data.height"></el-slider>
                <el-input-number v-model="data.height" :controls='false' :min="1" :max="50"></el-input-number>
              </div>
            </el-form-item>

            <el-form-item label="上下间距">
              <div class="slider_box">
                <el-slider class="slider_item" :max="50" v-model="data.margin.tb"></el-slider>
                <el-input-number v-model="data.margin.tb" :controls='false' :min="0" :max="50"></el-input-number>
              </div>
            </el-form-item>

            <el-form-item label="左右间距">
              <div class="slider_box">
                <el-slider class="slider_item" :max="50" v-model="data.margin.lr"></el-slider>
                <el-input-number v-model="data.margin.lr" :controls='false' :min="0" :max="50"></el-input-number>
              </div>
            </el-form-item>

          </el-form>
        </el-collapse-item>
      </el-collapse>
    </div>
  </el-card>
</template>

<script>
  import ColorPicker from '@/components/ColorPicker/index';

export default {
  data(){
    return{
      activeName:'c1'
    }
  },
  props: {
    data:{
      type:Object,
      default:{}
    }
  },
  components: {
    ColorPicker
  },
  methods: {
    //重置颜色
    Reset_Color(a, b) {
      this.data.color[a] = b
    }
  }
}
</script>

<style lang="scss" scoped>
.item {
  position: relative;
  width: 100%;
  display: flex;
  cursor: pointer;
  background: #F4F6F8;
  border-radius: 2px;
  box-sizing: border-box;
  border: 1px solid #E9EDEF;
  margin-bottom: 10px;
  padding: 10px 10px;

  &:hover{
    .icon-abl-close{
      display: block;
    }
  }

  .icon-abl-close{
    position: absolute;
    top: -6px;
    right: -9px;
    color: rgba(0, 0, 0, 0.3);
    display: none;
    font-size: 16px;
  }

  .dragbox{
    color: #909399;
    line-height: 60px;
    font-size: 16px;
    margin-right: 10px;
  }

  .img_box {
    width: 60px;
    height: 60px;
  }

  .item_select {
    flex: 1;
    margin-left: 10px;

    .select_link {
      background: #fff;

      .select_btn {
        padding: 4px 6px;
        color: #2D8CF0;
        box-sizing: border-box;
        border: 1px solid #fff;

        &:hover{
          border: 1px solid #2D8CF0;
        }
      }
    }

    .tip {
      display: block;
      font-family: PingFang SC;
      font-style: normal;
      font-weight: normal;
      font-size: 12px;
      line-height: 18px;
      color: #939799;
      /* margin-top: 8px; */
    }
  }
}
</style>
